﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


public class FileStorageOption
{
    /// <summary>
    /// 上传文件总大小
    /// </summary>
    public long MaxFileSize { get; set; }
    /// <summary>
    /// 多文件上传时，支持的最大文件数量
    /// </summary>
    public int NumLimit { get; set; }
    /// <summary>
    /// 允许某些类型文件上传，文件格式以,隔开
    /// </summary>
    public string Include { get; set; }
    /// <summary>
    /// 禁止某些类型文件上传，文件格式以,隔开
    /// </summary>
    public string Exclude { get; set; }
    /// <summary>
    /// LocalFileService、QiniuService
    /// </summary>
    public string ServiceName { get; set; }

    /// <summary>
    /// 本地存储操作
    /// </summary>
    public LocalOptions Local { get; set; }

    /// <summary>
    /// 七牛存储操作
    /// </summary>
    public QiniuOptions Qiniu { get; set; }
}
public class LocalOptions
{
    public string AK { get; set; } = "";
    /// <summary>
    /// 私钥
    /// </summary>
    [Newtonsoft.Json.JsonIgnore]
    public string SK { get; set; } = "";


    public LocalOption Private { get; set; }

    public LocalOption Public { get; set; }
}

public class LocalOption
{

    public string AbsolutePath { get; set; } = "";

    /// <summary>
    /// 
    /// </summary>
    public string Host { get; set; } = "";
}
public class QiniuOptions
{
    public string AK { get; set; } = "";
    /// <summary>
    /// 私钥
    /// </summary>
    [Newtonsoft.Json.JsonIgnore]
    public string SK { get; set; }
    public QiniuOption Private { get; set; }

    public QiniuOption Public { get; set; }

}
public class QiniuOption
{


    public string Bucket { get; set; }
    public string Host { get; set; }
    public bool UseHttps { get; set; }
    /// <summary>
    /// 用cdn加速
    /// </summary>
    public bool UseCdnDomain { get; set; }
    /// <summary>
    /// 七牛区域  默认南方
    /// </summary>
    public string Zone { get; set; } = "ZONE_CN_South";

    public object ZoneObj { get; set; }

}
